import { axios } from '@/utils/request'
export function sysAddMenu(parameter) {
  return axios({
    url: '/sys/menu/addMenu',
    method: 'post',
    data: parameter
  })
}
export function sysEidtMenu(parameter) {
  return axios({
    url: '/sys/menu/updateMenu',
    method: 'post',
    data: parameter
  })
}
export function sysDelMenu(parameter) {
  return axios({
    url: '/sys/menu/deleteMenu',
    method: 'post',
    data: parameter
  })
}
export function sysGetMenuTree(state) {
   state = state !== undefined ? state : '';
  return axios({
      url:`/sys/menu/listSysMenuTree?status=${state}`,
      method: 'get'
  })
}
export function sysQueryMenuList(state) {
   state = state !== undefined ? state : '';
  return axios({
    url: `/sys/menu/listSysMenu?status=${state}`,
    method: 'get'
  })
}
export function sysQueryMenuIdChildList(menuId) {
   menuId = menuId !== undefined ? menuId : '';
  return axios({
    url: `/sys/menu/selectChildMenusByParentId?menuId=${menuId}`,
    method: 'get'
  })
}
export function sysMenuDisable(parameter) {
  return axios({
    url: '/sys/menu/disableSysMenu',
    method: 'post',
    data: parameter
  })
}

